home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 17 / AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso / Rexx / Help.pprx < prev    next >
Text File  |  1997-05-06  |  3KB  |  126 lines

  1. /* Personal Paint Amiga Rexx script - Copyright © 1995-1997 Cloanto Italia srl */
  2.  
  3. /* $VER: Help.pprx 1.1 */
  4.  
  5. /** ENG
  6.  This script displays a list of all Rexx commands and options.
  7.  
  8.  The script can be executed with an argument, which is passed on to the
  9.  "Help" command, and which causes instructions to be displayed either for
  10.  the internal commands and options, or for the I/O modules, or for both.
  11.  
  12.  Additional information and support is available via E-mail from Cloanto.
  13.  E-mail: <support@cloanto.com>.
  14. */
  15.  
  16. /** DEU
  17.  Dieses Skript zeigt eine Liste aller Rexx-Befehle und -Optionen.
  18.  
  19.  Es läßt sich mit einem optionalen Argument ausführen, welches an
  20.  den Befehl "Help" übergeben wird und dazu führt, daß entweder
  21.  Hinweise zu den internen Befehlen und Optionen, zu den E/A-Modulen,
  22.  oder zu beiden Themenbereichen ausgegeben werden.
  23.  
  24.  Zusätzliche Informationen und Hilfestellungen erhalten Sie via
  25.  E-Mail direkt von Cloanto unter <support@cloanto.com>.
  26. */
  27.  
  28. /** ITA
  29.  Questo script mostra un elenco di tutti i comandi Rexx e delle loro opzioni.
  30.  
  31.  Si può eseguire lo script specificando un argomento, che è passato al comando
  32.  "Help", e che porta alla visualizzazione delle istruzioni o per i comandi
  33.  interni e loro opzioni, o per i moduli di I/O, o per entrambi.
  34.  
  35.  Informazioni aggiuntive e assistenza tecnica sono disponibili via posta
  36.  elettronica dalla Cloanto. E-mail: <support@cloanto.com>.
  37. */
  38.  
  39. IF ARG(1, EXISTS) THEN
  40.     PARSE ARG PPPORT topic output '"' title '"'
  41. ELSE
  42.     PPPORT = 'PPAINT'
  43.  
  44.  
  45. IF ~SHOW('P', PPPORT) THEN DO
  46.     IF EXISTS('PPaint:PPaint') THEN DO
  47.         ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
  48.         DO 30 WHILE ~SHOW('P',PPPORT)
  49.              ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  50.         END
  51.     END
  52.     ELSE DO
  53.         SAY "Personal Paint could not be loaded."
  54.         EXIT 10
  55.     END
  56. END
  57.  
  58. IF ~SHOW('P', PPPORT) THEN DO
  59.     SAY 'Personal Paint Rexx port could not be opened'
  60.     EXIT 10
  61. END
  62.  
  63. ADDRESS VALUE PPPORT
  64. OPTIONS RESULTS
  65. OPTIONS FAILAT 10000
  66.  
  67. Get 'LANG'
  68. IF RESULT = 1 THEN DO        /* Deutsch */
  69.     txt_port_name     = 'Rexx-Port: '
  70.     txt_rexx_ver      = 'Rexx-Version: '
  71.     txt_rexx_version  = '-- PPaint Rexx Version '
  72.     txt_io_modules    = '-- Verfügbare I/O Module --'
  73.     txt_err_oldclient = 'Für dieses Skript_ist eine neuere Version_von Personal Paint erforderlich'
  74. END
  75. ELSE IF RESULT = 2 THEN DO    /* Italiano */
  76.     txt_port_name     = 'Nome porta Rexx: '
  77.     txt_rexx_ver      = 'Versione Rexx: '
  78.     txt_rexx_version  = '-- Versione Rexx PPaint '
  79.     txt_io_modules    = '-- Moduli I/O disponibili --'
  80.     txt_err_oldclient = 'Questa procedura richiede_una versione più recente_di Personal Paint'
  81. END
  82. ELSE DO                /* English */
  83.     txt_port_name     = 'Port Name: '
  84.     txt_rexx_ver      = 'Rexx Version: '
  85.     txt_rexx_version  = '-- PPaint Rexx Version '
  86.     txt_io_modules    = '-- Available I/O Modules --'
  87.     txt_err_oldclient = 'This script requires a newer_version of Personal Paint'
  88. END
  89.  
  90. Version 'REXX'
  91. IF RESULT < 3 THEN DO
  92.     RequestNotify 'PROMPT "'txt_err_oldclient'"'
  93.     EXIT 10
  94. END
  95.  
  96. IF output = 'GUI' THEN DO
  97.     Help topic
  98.     helptext = RESULT
  99.     IF topic = 'Command' THEN DO
  100.         Version 'REXX'
  101.         helptext = txt_port_name || PPPORT '0a'X || txt_rexx_ver || RESULT '0a0a'X || helptext
  102.     END
  103.  
  104.     pos = 1
  105.     DO FOREVER
  106.         pos = INDEX(helptext, '"', pos)
  107.         IF pos = 0 THEN
  108.             BREAK
  109.         helptext = INSERT('"', helptext, pos)
  110.         pos = pos + 2
  111.     END
  112.  
  113.     RequestNotify '"'title'" "'helptext'" SCROLL'
  114. END
  115. ELSE DO
  116.     SAY txt_rexx_version || RESULT '--' '0a'X
  117.  
  118.     Help
  119.     SAY RESULT
  120.  
  121.     SAY '0a0a'X || txt_io_modules '0a'X
  122.  
  123.     Help 'IOFORMAT'
  124.     SAY RESULT
  125. END
  126.